evtchn/fifo: initialize priority when events are bound
authorDavid Vrabel <david.vrabel@citrix.com>
Wed, 8 Jan 2014 07:43:36 +0000 (08:43 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 8 Jan 2014 07:43:36 +0000 (08:43 +0100)
commit470a160402656e62e206a3f19edd4dcd7630cb22
tree4ed0e331d945ee2a5708e7779e068e63fa52ffaa
parentcedfdd43a9798e535a05690bb6f01394490d26bb
evtchn/fifo: initialize priority when events are bound

Event channel ports that are reused or that were not in the initial
bucket would have a non-default priority.

Add an init evtchn_port_op hook and use this to set the priority when
an event channel is bound.

Within this new evtchn_fifo_init() call, also check if the event is
already on a queue and print a warning, as this event may have its
first event delivered on a queue with the wrong VCPU or priority.
This guest is expected to prevent this (if it cares) by not unbinding
events that are still linked.

Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/common/event_channel.c
xen/common/event_fifo.c
xen/include/xen/event.h